
#include <iostream>
int ask()
{
    std::cout << "call ask()" << std::endl;
    return 1;
}

// typedef decltype(ask)* function_ptr;
using function_ptr = decltype(&ask);
using function_ref = decltype((ask));

class convertible_to_function_ptr {
public:
    operator function_ptr() const
    {
        return ask;
    }
    int operator()() { return 2; }
};

int main()
{
    auto ask_ptr = &ask;
    ask_ptr();
    auto& ase_ref = ask;
    ase_ref();

    convertible_to_function_ptr ask_wrapper;
    ask_wrapper();
    return 0;
}